﻿using System;

namespace Program10
{
    class Program
    {
        //static readomly 是动态常量 ，常量的值在编译期间不解析，所以开始都值默认值，x与y都是int类型，故都是0。
        static readonly int X = Y * 10;
        static readonly int Y = 10;
        
        static void Main(string[] args)
        {
            ///变量
            var number = 20;
            number = 50;
            Console.WriteLine("输出变量number是"+number );


            ///常量.在程序运行中不能改变
            const int number1 = 10;
            Console.WriteLine("输出变量number1是" + number1);
            //number1 = 20  常量不能进行复制

            const int B =10;
            const int A = B * 10;
            Console.WriteLine("A is {0}, B  is {1}", A, B);

            Console.WriteLine("x is {0},y  is {1}", X, Y );

        }
    }
}
